	<%- include('header.html') %>
	</head>
	<body>
		是目录模版一
		<%- include('nav.html') %>
		<div id="index_right">
			<% for(let i=0;i<catalog.postList.length;i++){
				var post=catalog.postList[i];
			%>
			<div class="singleEassy">
				<h2 class="eassyTitle"><%= post.title%>
					<span class="EassyTime">
					<%=	Helper.formatTime(post.created,"YYYY/MM/DD") %>
					</span>
				</h2>
				<p class="expertTip">摘要</p>
				<div class="eassyExpert">
					<% 
						if(post.thumbnail){
					%>
						<img src="<%=baseInfo.siteUrl+post.thumbnail %>" alt="" class="eassyThumbnail">
					<%
						}
					%>
					<%=post.excerpt%>
				</div>
				<div class="otherInfo">
					<% 
					
					var tags=Helper.formatTag(post.tags);
					for(let i in tags){
					%>
					<span class="tags color<%= Helper.rand(1,5)%>"><%= tags[i]%></span>

					<% }%>
					<span class="moreRead"><a href="<%= Helper.getPostLink(post.eid)%>">
						阅读					
					</a>
					</span>
				</div>
			</div>	
			<% }%>	

			<!-- 分页啊 -->
			<% 
				var allPost=posts.postCount;
				var perPage=baseInfo.postPerPage;
				var allPage=allPost/perPage;
				if(allPost%perPage>0){
					allPage++;
				}

				var maxPage=page+2,
					minPage=page-2;
					maxPage=maxPage>allPage?allPage:maxPage;
					minPage=minPage<1?1:minPage;

					if(maxPage-minPage<5&&allPage>4){
						maxPage=allPage;
						minPage=1;										
					}
			%>
			<ul class="pages">
				<% for(let i=minPage;i<=maxPage;i++){
				%>
					<li><a class="<%= i==page?'active':''%>" href="<%=Helper.getCatalogPageLink(i,catalog.catalogInfo.slug) %>"><%=i%></a></li>

				<%}%>
			</ul>
			<!-- 分页结束 -->	
						
			<%- include('footer.html') %>								
		</div>
	</body>
<script type="text/javascript">
	//演示使用，正常使用时应该删除这段js，这里只是为了显示当前模版注入了哪些信息，便于调试
	var allData=<%- JSON.stringify(locals) %>;
	console.log(allData);
</script>
</html>